// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
//VUE核心
import Vue from "vue";
import {sync} from "vuex-router-sync";
//VUE配置
import axios from "axios";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import axiosConfig from "./common/axiosConfig";
import * as filters from "./filters";
//插件
import MintUI from "mint-ui";
import ElementUI from "element-ui";
import 'element-ui/lib/theme-default/index.css'
import "mint-ui/lib/style.css";
import "font-awesome/css/font-awesome.css";
import katex from "katex/dist/katex.js";
import renderMathInElement from "katex/dist/contrib/auto-render.min.js";
import "katex/dist/katex.min.css"
//自定义
import Func from "structure/Func";
import Tools from "structure/Tools";
import AccFloat from 'structure/Float';
import "components/widget/index";
import 'assets/css/_variable.scss';
import 'assets/css/index.scss';
import 'assets/css/module.scss';

// Enable devtools
Vue.config.devtools = true;
Vue.config.productionTip = false;

Vue.prototype.$http = axiosConfig;
Vue.axios = axios;

Vue.use(MintUI);
Vue.use(ElementUI);
Vue.prototype.$katex = katex;
Vue.prototype.$renderMathInElement = renderMathInElement;
window.katex = katex;
window.renderMathInElement = renderMathInElement;

Vue.prototype.$func = Func;
Vue.prototype.$tools = Tools;
Vue.prototype.$float = AccFloat;
Vue.prototype.$env = ENV;



sync(store, router);

const {state} = store;

Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key]);
});

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: {App}
});


